using System.IO;
using UnityEditor;
using UnityEngine;
namespace DTFramework.Editor
{
    public static class BuiltinDefultConfig
    {
        [MenuItem("DTFramework/Generate BuiltinConfig", priority = 1)]
        public static void GenerateBuiltinDefultConfig()
        {
            var path = $"Assets/GameMain/Configs/BuiltinConfig.asset";
            if (File.Exists(path))
            {
                Debug.Log($"==> 目标文件已经存在，路径：{path}");
                return;
            }
            var data = ScriptableObject.CreateInstance<BuiltinConfig>();
            data.ReflashReference();
            AssetDatabase.CreateAsset(data, path);
            Debug.Log($"创建 BuiltinConfig.asset 成功！");
            AssetDatabase.Refresh();
        }
    }
}
